#ifndef SOUND_H_
#define SOUND_H_

#include <audiere.h>
using namespace audiere;

#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

class Sound
{
public:
  Sound();
	Sound(AudioDevicePtr audiodev,ICameraSceneNode *handler, stringc source, bool autostart, bool repeat, float volume, float pan, float pitch, f32 az, f32 el);
	virtual ~Sound();

	stringc Source;
	OutputStream *Stream;
	ICameraSceneNode *Pointer;
	f32 Azimuth;
	f32 Elevation;
	float Volume;
	bool  Autostart;

	AudioDevicePtr AudioDev;

	ISceneNode *SoundRotation, *SoundCube;

	void play();
	void stop();
	bool isPlaying();
	void setRepeat(bool repeat);

	void setVolume(float volume);
	void setPan(float pan);
	void setPitch(float pitch);
	void setPosition(f32 az, f32 el);

	void update();

	void serialize(IAttributes* attributes);
};

#endif /*SOUND_H_*/
